﻿using Foxit.PDF;
using Foxit.PDF.PageElements;
using Sustainalytics.Reporting.Framework;
using Sustainalytics.RiskRatings.Reporting.Charts;
using Sustainalytics.RiskRatings.Reporting.Headers_and_Footers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Sustainalytics.RiskRatings.Reporting
{
    public class SubIndustryOverviewSection : PdfReportSectionGenerator
    {
        public SubIndustryOverviewSection(int index) : base(index)
        {
            this._reportSection.Name = "SubIndustryOverviewSection";
        }

        public override void ComposeSectionContent()
        {
            _report.PageSize = PageSize.A4;
            _report.PageOrientation = PageOrientation.Portrait;
            _report.PageMargins = 25f;
            _report.PageDimensions = new PageDimensions(_report.PageSize, _report.PageOrientation, _report.PageMargins);
            var columnWidth = (_report.PageMaxWidth - (float)HorisontalSpacing.Large) / 2;
            var page = new PdfReportPage_RiskRatingOverview(_report, _dataSource, false);
            _report.Pages.Add(page);
        }
    }
}
